package com.qing.qingcodegenerate.model.dto.chathistory;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.io.Serializable;

/**
 * 聊天历史添加请求
 *
 * @author 86157
 * @since 2025-08-09
 */
@Data
public class ChatHistoryAddRequest implements Serializable {

    /**
     * 消息内容
     */
    @NotBlank(message = "消息内容不能为空")
    private String message;

    /**
     * 消息类型：user/ai/error
     */
    @NotBlank(message = "消息类型不能为空")
    private String messageType;

    /**
     * 应用id
     */
    @NotNull(message = "应用ID不能为空")
    @Positive(message = "应用ID必须为正数")
    private Long appId;

    /**
     * 用户id
     */
    @NotNull(message = "用户ID不能为空")
    @Positive(message = "用户ID必须为正数")
    private Long userId;

    private static final long serialVersionUID = 1L;
}
